<?php

use yii\helpers\Url;

?>

<div class="row">
  
    <div class="col-md-12">
    	 <div class="panel panel-default">
    	 <div class="panel-heading">商户查找</div>
    	 <div class="panel-body">
        	<form class="form-inline" action="<?= Url::toRoute(['show']) ?>" method="post" target="_blank">
              <div class="form-group">
                <label for="business_id">商户id</label>
                <input type="text" class="form-control" id="business_id" placeholder="商户id" name="admin_id">
              </div>
              <div class="form-group">
                <label for="business_username">商户username</label>
                <input type="text" class="form-control" id="business_username" placeholder="商户username" name="admin_username">
              </div>
              <button type="submit" class="btn btn-default">查询</button>
            </form>
            </div>
        </div>
        </div>
        
        <div class="col-md-12">
    	 <div class="panel panel-info">
    	 <div class="panel-heading">用户查找</div>
    	 <div class="panel-body">
        	<form class="form-inline" action="<?= Url::toRoute(['member/show']) ?>" method="post" target="_blank">
              <div class="form-group">
                <label for="user_id">用户id</label>
                <input type="text" class="form-control" id="user_id" placeholder="用户id" name="user_id">
              </div>
              <div class="form-group">
                <label for="business_username">用户phone</label>
                <input type="text" class="form-control" id="user_phone" placeholder="用户phone" name="user_phone">
              </div>
              <button type="submit" class="btn btn-info">查询</button>
            </form>
            </div>
        </div>
    </div>
    
            <div class="col-md-12">
    	 <div class="panel panel-info">
    	 <div class="panel-heading">快捷查找</div>
    	 <div class="panel-body">
				<table class="table table-bordered">
					 <tr>
                    	<td>
                    		<a class="btn btn-primary btn-sm" target="_blank" href="<?= Url::toRoute(['business/priced-list'])?>">收费项目</a>
                    	</td>
                   		<td>
                    		<a class="btn btn-primary btn-sm" target="_blank" href="<?= Url::toRoute(['logs/index'])?>">日志查询</a>
                    	</td>
                    	
                    	<td>
                    		<a class="btn btn-primary btn-sm" target="_blank" href="<?= Url::toRoute(['consume/index'])?>">消费系统</a>
                    	</td>
                    	
                    </tr>
				</table>
            </div>
        </div>
    </div>
    
    
	<div class="col-md-12">
		
		    <div class="panel panel-primary">
        <div class="panel-heading">business</div>
        <div class="panel-body">
            <table class="table table-bordered">
            <thead>
                <tr>
                    <th>商户id</th>
                    <th>商户名称</th>
                    <th>商户host</th>
                    <th>商户startID</th>
                    <th>消费明细</th>
                </tr>
            </thead>
            <tbody>
                <?php 
                    if (!empty($business)):
                    foreach ($business as $key => $item):
                ?>
                <tr>
                    <td><?= $key?></td>
                    <td><?= $item['name']?></td>
                    <td><?= $item['host']?></td>
                    <td><?= $item['startID']?></td>
                    <td>
                    	<a class="btn btn-primary btn-sm" target="_blank" href="<?= Url::toRoute(['show', 'admin_id' => $key])?>">商户信息</a>
                    </td>
                </tr>
                
                <?php 
                    endforeach;
                    endif;
                ?>
            </tbody>
            </table>
        </div>
    </div>
		
		
	</div>
</div>